﻿using Atletika.Shared.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Atletika.Shared.Entities
{
    public class Article
    {
        public int ID { get; set; }
        public int CategoryId { get; set; }
        public string Title { get; set; }
        public string City { get; set; }
        public DateTime Date { get; set; }
        public string Editor { get; set; }
        public string Perex { get; set; }
        public string Text { get; set; }
        public string ImagePath { get; set; }
        public string ImageText { get; set; }
        public bool Top { get; set; }

        public string PublishInfo
        {
            get 
            { 
                return this.City.ToUpper() + " " + this.Date.ToString("dd.MM.yyyy") + " (" + this.Editor + ")"; 
            }
        }

        public string FullImagePath 
        {
            get
            {
                return DownloadHelper.baseAdress + "Content/articles/" + this.ImagePath;
            }
        }
    }
}
